package com.heima.wemedia.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmStatisticsDTO;
import com.heima.wemedia.service.WmStatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(value = "自媒体统计分析API", tags = "自媒体统计分析API")
@RequestMapping("/api/v1/statistics")
public class WmStatisticsController {
    @Autowired
    private WmStatisticsService wmStatisticsService;

    @PostMapping("/news")
    @ApiOperation("自媒体平台统计分析")
    public ResponseResult statisticsNews(@RequestBody  WmStatisticsDTO dto) {
        return wmStatisticsService.statisticsNews(dto);
    }

    @PostMapping("/fans")
    @ApiOperation("粉丝概况")
    public ResponseResult fans(@RequestBody WmStatisticsDTO dto) {
        return wmStatisticsService.fans(dto);
    }
}
